package com.jeeplus.modules.project.service;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.common.persistence.Page;
import com.jeeplus.common.service.CrudService;
import com.jeeplus.modules.project.dao.BaseProjectInfoDao;
import com.jeeplus.modules.project.entity.BaseProjectInfo;
import com.jeeplus.modules.project.entity.vo.ProjectStatisticsVo;
import com.sun.org.apache.regexp.internal.recompile;

/**
 * 项目基本信息类Service
 * @author jacky
 * @version 2017-12-19
 */
@Service
@Transactional(readOnly = true)
public class BaseProjectInfoService extends CrudService<BaseProjectInfoDao, BaseProjectInfo> {

	public BaseProjectInfo get(String id) {
		return super.get(id);
	}
	
	public List<BaseProjectInfo> findList(BaseProjectInfo baseProjectInfo) {
		return super.findList(baseProjectInfo);
	}
	
	public Page<BaseProjectInfo> findPage(Page<BaseProjectInfo> page, BaseProjectInfo baseProjectInfo) {
		return super.findPage(page, baseProjectInfo);
	}
	
	@Transactional(readOnly = false)
	public void save(BaseProjectInfo baseProjectInfo) {
		super.save(baseProjectInfo);
	}
	
	@Transactional(readOnly = false)
	public void delete(BaseProjectInfo baseProjectInfo) {
		super.delete(baseProjectInfo);
	}
	
	@Transactional(readOnly = false)
	public void updateCourseCheckPath(BaseProjectInfo info) throws Exception{
		 dao.updateCourseCheckPath(info);
	}
	
	@Transactional(readOnly = false)
	public void updateStatus(BaseProjectInfo info) throws Exception{
		 dao.updateStatus(info);
	}
	
	public List<ProjectStatisticsVo> projectSetUpStatistics(Map<String, Object> map){
		return dao.projectSetUpStatistics(map);
	}
	
	public List<ProjectStatisticsVo> projectLevelStatistics(Map<String, Object> map){
		return dao.projectLevelStatistics(map);
	}
	
	public Integer findCountByUser(BaseProjectInfo projectInfo) {
		return dao.findCountByUser(projectInfo);
	}
	
	public List<ProjectStatisticsVo> projectStatusStatistics(Map<String, Object> map){
		return dao.projectStatusStatistics(map);
	}
	
}